import 'package:kkhousekeep/generated/json/base/json_convert_content.dart';
import 'package:kkhousekeep/models/order_count_entity.dart';

OrderCountEntity $OrderCountEntityFromJson(Map<String, dynamic> json) {
	final OrderCountEntity orderCountEntity = OrderCountEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		orderCountEntity.code = code;
	}
	final OrderCountObj? obj = jsonConvert.convert<OrderCountObj>(json['obj']);
	if (obj != null) {
		orderCountEntity.obj = obj;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		orderCountEntity.msg = msg;
	}
	return orderCountEntity;
}

Map<String, dynamic> $OrderCountEntityToJson(OrderCountEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['obj'] = entity.obj.toJson();
	data['msg'] = entity.msg;
	return data;
}

OrderCountObj $OrderCountObjFromJson(Map<String, dynamic> json) {
	final OrderCountObj orderCountObj = OrderCountObj();
	final int? pending = jsonConvert.convert<int>(json['pending']);
	if (pending != null) {
		orderCountObj.pending = pending;
	}
	final int? processing = jsonConvert.convert<int>(json['processing']);
	if (processing != null) {
		orderCountObj.processing = processing;
	}
	final int? hanging = jsonConvert.convert<int>(json['hanging']);
	if (hanging != null) {
		orderCountObj.hanging = hanging;
	}
	final int? processed = jsonConvert.convert<int>(json['processed']);
	if (processed != null) {
		orderCountObj.processed = processed;
	}
	return orderCountObj;
}

Map<String, dynamic> $OrderCountObjToJson(OrderCountObj entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['pending'] = entity.pending;
	data['processing'] = entity.processing;
	data['hanging'] = entity.hanging;
	data['processed'] = entity.processed;
	return data;
}